import request from '../utils/request';


export async function projectCode() {
  return request('/account/projectCode', {
    method: 'GET',
  });
}
export async function byCode(params) {
  return request(`/account/projectCode/${params.code}`, {
    method: 'GET',
  });
}
export async function getRegular() {
  return request('/passwordstrategy/getregular', {
    method: 'POST',
  });
}
export async function getRegularActive(params) {
  return request(`/passwordstrategy/getregularactive?username=${params}`, {
    method: 'POST',
  });
}
export async function sendCode(params) {
  return request('/account/sendCode', {
    method: 'POST',
    body: {
      ...params,
      method: 'post',
    },
  });
}
export async function resetPassword(params) {
  return request('/user/resetPassword', {
    method: 'PUT',
    body: {
      ...params,
      method: 'put',
    },
  });
}
export async function resetPasswordAdmin(params) {
  return request('/user/resetPasswordAdmin', {
    method: 'PUT',
    body: {
      ...params,
      method: 'put',
    },
  });
}
export async function checkedPhone(params) {
  return request(`/common/checkPhone/${params.phone}/${params.captcha}`, {
    method: 'GET',
  });
}

export async function checkedAccount(params) {
  return request(`/account/check`, {
    method: 'GET',
    params
  });
}
